package com.lin.pay.ali.service;

import com.alipay.api.AlipayApiException;
import com.alipay.api.response.AlipayTradeAppPayResponse;
import com.alipay.api.response.AlipayTradeCloseResponse;
import com.alipay.api.response.AlipayTradeFastpayRefundQueryResponse;
import com.alipay.api.response.AlipayTradeQueryResponse;
import com.alipay.api.response.AlipayTradeRefundResponse;
import com.lin.common.error.CustomRuntimeException;

public interface AliService {

    //alipay.trade.app.pay
    AlipayTradeAppPayResponse appPay(String out_trade_no, String total_amount, String subject) throws CustomRuntimeException, AlipayApiException;

    //统一收单线下交易查询  AlipayTradeQueryRequest
    AlipayTradeQueryResponse query(String out_trade_no) throws AlipayApiException, CustomRuntimeException;

    //AlipayTradeRefundRequest
    AlipayTradeRefundResponse refund(String trade_no,String refund_amount,String out_request_no) throws AlipayApiException, CustomRuntimeException;

    //AlipayTradeFastpayRefundQueryResponse,AlipayTradeFastpayRefundQueryRequest
    AlipayTradeFastpayRefundQueryResponse refundquery(String trade_no, String out_request_no) throws AlipayApiException, CustomRuntimeException;

    //AlipayTradeCloseRequest
    AlipayTradeCloseResponse close(String trade_no) throws AlipayApiException, CustomRuntimeException;

}
